* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    width: 450px;
    margin: 0;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
}

h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
}

.input-area, .output-area {
    width: 100%;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: none;
    font-size: 15px;
    line-height: 1.5;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.language-selector {
    display: flex;
    gap: 12px;
    margin: 12px 0;
    align-items: center;
}

select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    flex: 1;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

#switchLang {
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#switchLang:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

#translateBtn {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

#translateBtn:hover {
    background-color: #45a049;
}

#translateBtn:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
}

#translatedText {
    background-color: #f8f9fa;
}

/* 添加响应式动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 添加滚动条样式 */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 